<template>
    <el-container direction="verticle" style="100%">
        <el-container  style="height:100%;">
        <el-main style="height:50%">
            <div class="sys-page">
                
                <!-- <app-title :title="dialogTitle" style="display:inline;"></app-title> -->
                
                 <el-button type="success" size="mini" @click="refresh()" round style=" margin-top:10px;" icon="el-icon-refresh">刷新</el-button>

                <el-button type="info" size="mini" @click="download()" round style="margin-top:10px;margin-bottom:10px;" icon="el-icon-download">导出</el-button>
                <!-- <app-notes><el-button @click="searchFlag = true">安全日志报表统计分析</el-button></app-notes> -->
                <el-collapse  accordion>
                      <el-collapse-item >
                        <template slot="title">
                          <span style="font-size:20px;color:orange;">统计分析</span><i class="header-icon el-icon-search"></i>
                        </template>

                        <el-form :model="form" :label-width="formLabelWidth">
                        <el-row>
                            <el-col :span="6">
                                <el-form-item label="触发用户" >
                                    <el-input v-model="form.userId" auto-complete="off"></el-input>
                                </el-form-item>
                            </el-col>
                            <el-col :span="6">
                                <el-form-item label="终端IP"  :label-width="formLabelWidth" >
                                    <el-input v-model="form.source" auto-complete="off"></el-input>
                                </el-form-item>
                            </el-col>
                        

                            <el-col :span="6">
                                <el-form-item label="事件" :label-width="formLabelWidth">
                                    <el-select v-model="form.event" placeholder="请选择事件类型">
                                       
                                        <el-option label="用户激活" value="A0011"></el-option>
                                        <el-option label="用户解锁" value="A0012"></el-option>
                                        <el-option label="终端解锁" value="B0010"></el-option>
                                        <el-option label="高频访问" value="X0001"></el-option>
                                    </el-select>
                                </el-form-item>
                            </el-col>
                            <el-col :span="6">
                                <el-form-item label="结果" :label-width="formLabelWidth">
                                    <el-select v-model="form.result" placeholder="请选择活动区域">
                                        <el-option label="成功" value="0"></el-option>
                                        <el-option label="失败" value="1"></el-option>
                                    </el-select>
                                </el-form-item>
                            </el-col>
                            </el-row>
                        <el-row>
                            <el-col :span="6">
                                <el-form-item label="是否核心功能" :label-width="formLabelWidth">
                                    <el-select v-model="form.kernel" placeholder="">
                                        <el-option label="是核心功能" value="1"></el-option>
                                        <el-option label="非核心功能" value="0"></el-option>
                                    </el-select>
                                </el-form-item>
                            </el-col>
                            <el-col :span="6">
                                <el-form-item label="是否常规业务" :label-width="formLabelWidth">
                                    <el-select v-model="form.normal" placeholder="">
                                        <el-option label="是常规业务" value="1"></el-option>
                                        <el-option label="非常规业务" value="0"></el-option>
                                    </el-select>
                                </el-form-item>
                            </el-col>
                            <el-col :span="6">
                                <el-form-item label="身份" :label-width="formLabelWidth">
                                    <el-select v-model="form.identity" placeholder="">
                                        <el-option label="警员" value="1"></el-option>
                                        <el-option label="非警员" value="0"></el-option>
                                    </el-select>
                                </el-form-item>
                            </el-col>
                        </el-row>

                        <el-row>
                            <el-col :span="7">
                                <el-form-item label="起始时间" :label-width="formLabelWidth">
                                    <el-date-picker type="datetime" placeholder="选择时间" v-model="form.stime" @change="getSTime"  value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%;"></el-date-picker>

                                </el-form-item>
                            </el-col>
                            <el-col :span="7">
                                <el-form-item label="结束时间" :label-width="formLabelWidth">
                                    <el-date-picker type="datetime" placeholder="选择时间" v-model="form.etime" @change="getETime" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%;"></el-date-picker>

                                </el-form-item>
                            </el-col>
                        </el-row>
                    </el-form>
                        <el-button icon="el-icon-delete" @click="reset">重置</el-button>
                        <el-button icon="el-icon-search" type="primary" @click="conditionQuery">确 定</el-button>
                    </el-collapse-item>
                </el-collapse>

                    <el-table  v-loading="loading" boarder  style="width: 100%" :data="tableData.body" >
                        <el-table-column type="expand">
                          <template slot-scope="props">
                            <el-form label-position="left" inline class="demo-table-expand">
                              <el-form-item label="操作时间" >
                                <span>{{ timeFormatter(props.row, null, null) }}</span>
                              </el-form-item>
                              <el-form-item label="触发用户">
                                <span>{{ props.row.userId }}</span>
                              </el-form-item>
                              <el-form-item label="用户身份">
                                <span>{{ props.row.identity }}</span>
                              </el-form-item>
                              <el-form-item label="事件">
                                <span>{{ eventFormatter(props.row, null, null) }}</span>
                              </el-form-item>
                              <el-form-item label="终端IP">
                                <span>{{ props.row.source }}</span>
                              </el-form-item>
                              <el-form-item label="类型">
                                <span>{{ typeFormatter(props.row, null, null) }}</span>
                              </el-form-item>
                              <el-form-item label="所属模块">
                                <span>{{ moduleFormatter(props.row, null, null) }}</span>
                              </el-form-item>
                              <el-form-item label="是否核心">
                                <span>{{ kernelFormatter(props.row, null, null) }}</span>
                              </el-form-item>
                              <el-form-item label="是否常规业务">
                                <span>{{ normalFormatter(props.row, null, null) }}</span>
                              </el-form-item>
                              <el-form-item label="结果">
                                <span>{{ resultFormatter(props.row, null, null) }}</span>
                              </el-form-item>
                              <el-form-item label="描述" style="margin-right: 0; margin-bottom: 0; width:100%;">
                                <span style="color:red;">{{ props.row.desc }}</span>
                              </el-form-item>
                            </el-form>
                          </template>
                        </el-table-column>


                        <el-table-column style="background-color:16#123456" label="数据安全" width="120" align="center">
                           <template slot-scope="scope">
                                <div v-if="scope.row.safe==false">
                                    <i class="el-icon-warning"></i>
                                    <span style="color:red"> 数据异常</span>
                                </div>
                                <div v-else-if="scope.row.safe==true">
                                    <i class="el-icon-success"></i>
                                    <span style="color:green">数据完整</span>
                                </div>
                          </template>
                        </el-table-column>
                        <el-table-column label="操作时间"  align="center" width="155" prop="time" :formatter="timeFormatter"></el-table-column>
                        <el-table-column label="触发用户" align="center"  width="100" prop="userId"></el-table-column>
                        </el-table-column>
                        <el-table-column label="用户身份" align="center"  width="100" prop="identity" :formatter="identityFormatter"></el-table-column>
                        </el-table-column>

                        <el-table-column label="终端IP"  align="center" width="140" prop="source"></el-table-column>
                        <el-table-column label="类型"  align="center" width="80" prop="type" :formatter="typeFormatter"></el-table-column>
                        <el-table-column label="模块"  align="center" width="80" prop="module" :formatter="moduleFormatter"></el-table-column>
                        <el-table-column label="是否核心功能"  align="center" width="120" prop="kernel" :formatter="kernelFormatter"></el-table-column>
                        <el-table-column label="是否常规业务"  align="center" width="120" prop="normal" :formatter="normalFormatter"></el-table-column>
                        <el-table-column label="结果" align="center"   prop="result" :formatter="resultFormatter"></el-table-column>
                        
                        
                    </el-table>
                     <div align="center">
                      <el-pagination
                          @size-change="handleSizeChange"
                          @current-change="handleCurrentChange"
                          :current-page="currentPage"
                          :page-sizes="[10, 20, 30, 40]"
                          :page-size="pageSize"
                          layout="total, sizes, prev, pager, next, jumper"
                          :total="totalCount">
                      </el-pagination>
                  </div>
                <div class="sys-page">
            <app-section title="安全日志报表统计">
               <!--  <app-toolbar>
                    <el-button type="primary" @click="getChartData">刷新数据</el-button>
                </app-toolbar> -->
                <div style="display:inline; float:left" id="myChart" :style="{width: '600px', height: '500px'}"></div>
                <div style="display:inline; float:left" id="myBar" :style="{width: '600px', height: '500px'}"></div>
                <div style="display:inline; float:left" id="myChart3" :style="{width: '600px', height: '500px'}"></div>
            </app-section>
        </div>
            </div>
        </el-main>
    <!-- <el-footer> -->
        
    <!-- </el-footer> -->
    </el-container>

   
    </el-container>
</template>
<style>
  .el-table .warning-row {
    background: #F08080;
  }

  .el-table .success-row {
    background:#f0f9eb;
  }
  .demo-table-expand {
    font-size: 0;
  }
  .demo-table-expand label {
    width: 130px;
    color: #99a9bf;
  }
  .demo-table-expand .el-form-item {
    margin-right: 0;
    margin-bottom: 0;
    width: 33%;
  }
</style>

<script>
import mEcharts from 'echarts'

export default {
    name:'securitylog',
    data(){
        return {
            dialogTitle:"用户安全日志查询",
            loading: false,
            searchFlag: true,
            pageNum: 1,
            dataCount: null,
            totalCount: 0,
            pageSize: 10,
            currentPage: 1,
            start: 1,
            url: window.axios_g.BASEURL,
            reportPermission: false,
            echartData: [],
            identityEchars: [],
             echartList:[],
            categoryKeyList:[],
            categoryValueList:[],
            tableData:{
                body:[],
                head:[],
                loading : true
            },
            exportCondition: {
                result: null,
                userId: null,
                event: null,
                source: null,
                kernel: null,
                identity: null,
                normal: null,
                stime: null,
                etime: null
            },
            form: {
                result: null,
                userId: null,
                event: null,
                source: null,
                kernel: null,
                identity: null,
                normal: null,
                stime: null,
                etime: null
            },
            formLabelWidth: '120px',
            errorMsg:"您的信息有误，请联系管理员修改",
            reliable:true,

       }
    },
    mounted(){
         this.exportCondition.result=null
        this.exportCondition.userId=null
        this.exportCondition.event=null
        this.exportCondition.kernel=null
        this.exportCondition.normal=null
        this.exportCondition.source=null
        this.exportCondition.stime=null
        this.exportCondition.etime=null

        this.$nextTick(function() {
          this.drawPie('myChart')
          })
        // this.checkData()
    },
    methods:{
        showReport(){
             let msg = {
            result: this.form.result,
            event: this.form.event,
            source:this.form.source,
            userId: this.form.userId,
            group: 'user_id',
            stime: this.timeStrToTimestamp(this.form.stime),
            etime: this.timeStrToTimestamp(this.form.etime)
          }
          let msg2 = {
            result: this.form.result,
            event: this.form.event,
            source:this.form.source,
            userId: this.form.userId,
            group: 'event',
            stime: this.timeStrToTimestamp(this.form.stime),
            etime: this.timeStrToTimestamp(this.form.etime)
          }
          let msg3 = {
            result: this.form.result,
            event: this.form.event,
            source:this.form.source,
            userId: this.form.userId,
            group: 'identity',
            stime: this.timeStrToTimestamp(this.form.stime),
            etime: this.timeStrToTimestamp(this.form.etime)
          }
            let url = "/security-logger/report.shtml?entity="+encodeURI(JSON.stringify(msg));
            let url2 = "/security-logger/report.shtml?entity="+encodeURI(JSON.stringify(msg2));
             let url3 = "/security-logger/report.shtml?entity="+encodeURI(JSON.stringify(msg3));
            this.HTTP.methods.apiGet(url).then(res =>
            {
                if(res.code == 200){
                    if(res.data){
                        console.log(res)
                        this.echartList = []
                        for(let i=0; i<res.data.length; i++){
                            let obj = {value:res.data[i].count,
                                    name: res.data[i].group}
                            this.echartList.push(obj)
                        }
                    }
                    this.drawPie('myChart')
                }
            })
            this.HTTP.methods.apiGet(url3).then(res =>
            {
                if(res.code == 200){
                    if(res.data){
                        this.echartList = []
                        for(let i=0; i<res.data.length; i++){
                            let obj = {value:res.data[i].count,
                                    name: res.data[i].group==1?'警员':'非警员'}
                            this.echartList.push(obj)
                        }
                    }
                    this.drawPie('myChart3')
                }
            })
            this.HTTP.methods.apiGet(url2).then(res =>
            {
                if(res.code == 200){
                    if(res.data){

                        this.categoryKeyList = []
                        this.categoryValueList = []
                        for(let i=0; i<res.data.length; i++){
                            let str = this.getPermissionTypeName(res.data[i].group)
                            if(str!=''){
                                this.categoryKeyList.push(str)
                                 this.categoryValueList.push(res.data[i].count)
                             }
                            // let obj = {value:res.data[i].count,
                            //         name: res.data[i].group}
                            // this.echartList2.push(obj)
                        }
                        for(let j=0; j<this.categoryKeyList.length;j++){
                            if(this.categoryKeyList[j]=='用户高频访问'){
                                break;
                            }else if(j==this.categoryKeyList.length-1){
                                this.categoryKeyList.push('用户高频访问')
                                this.categoryValueList.push(0)
                            }
                        }
                    }
                    this.drawTable('myBar')
                }
            })
        },
        drawTable(obj){
            /*ECharts图表*/
         let myChart = mEcharts.init(document.getElementById(obj));
         myChart.setOption(
            {
            title: {
                text: '各个模块的操作次数统计',
                left: 'center',
                top: 20
            },
            color: ['#3398DB'],
            tooltip : {
                 
            },
            toolbox: {
                show : true,
                feature : {
                    dataView : {show: true, readOnly: false},
                    magicType : {show: true, type: ['line', 'bar']},
                    restore : {show: true},
                    saveAsImage : {show: true}
                }
            },
            grid: {
                left: '3%',
                right: '4%',
                y2:80,
                containLabel: true
            },
            xAxis : [
                {
                    type : 'category',
                    data : this.categoryKeyList,  //重点在这里  加载后台数据  横坐标名称
                    axisTick: {
                        alignWithLabel: true
                    },
                    axisLabel:{
                        interval:0,
                        rotate:-30
                    }
                }
                 
            ],
            yAxis : [
                {
                    type : 'value'
                }
            ],
            series : [
                {
                    name:'',
                    type:'bar',
                    barWidth: '60%',
                    data: this.categoryValueList  //重点在这里   加载数据  柱状图数据
                }
            ]
        }
        )
        },
        drawPie(obj){
            /*ECharts图表*/
         var myChart = mEcharts.init(document.getElementById(obj));
         myChart.setOption({
          series : [
           {
            name: '用户操作次数统计',
            type: 'pie',
            radius: '50%',
            itemStyle:{ 
              normal:{ 
                    label:{ 
                      show: true, 
                      formatter: '{b} : {c} ({d}%)' 
                    }, 
                    labelLine :{show:true} 
                  } 
              } ,
            data:this.echartList
           }
          ]
         })
        },
        drawIdentityPie(obj){
            /*ECharts图表*/
         let myChart = mEcharts.init(document.getElementById(obj));
         myChart.setOption({
          series : [
           {
            name: '用户类型操作次数统计',
            type: 'pie',
            radius: '50%',
            itemStyle:{ 
              normal:{ 
                    label:{ 
                      show: true, 
                      formatter: '{b} : {c} ({d}%)' 
                    }, 
                    labelLine :{show:true} 
                  } 
              } ,
            data:this.identityEchars
           }
          ]
         })
        },
        download(){
             var param_s = encodeURI(JSON.stringify(this.exportCondition))
            let base = this.url
            let downloadUrl = "security-logger/export.shtml?entity=" + param_s
            
            let data = {}
           
            var link = document.createElement('a')
            link.href = base + downloadUrl
            console.log(link.href)
            link.download = '安全日志导出表.xls'
            link.click()
        },
        checkData(){
            this.HTTP.methods.apiGet("/security-logger/safe.shtml").then(res =>
            {
               if(res.data == false){
                    
                    this.$notify({
                      title: '警告',
                      message: '您访问的这张表数据不完整，记录被删除过'
                    });
               }

            }
        )
        },
        reset() {
            this.reportPermission = false;
            this.form.result=null
            this.form.userId=null
            this.form.event=null
            this.form.source=null
            this.form.kernel=null
            this.form.normal=null
            this.form.stime=null
            this.form.etime=null

            this.exportCondition.result=null
            this.exportCondition.userId=null
            this.exportCondition.event=null
            this.exportCondition.source=null
            this.exportCondition.kernel=null
            this.exportCondition.normal=null
            this.exportCondition.stime=null
            this.exportCondition.etime=null
        },
        refresh(){
            if(this.reportPermission){
                this.conditionQuery()
            }else{
                this.query()
            }
            
        },
         //每页显示数据量变更
        handleSizeChange: function(val) {
            this.pageSize = val;
            if(this.reportPermission){
                this.conditionQuery()
            }else{
                this.query()
            }
            
        },

        //页码变更
        handleCurrentChange: function(val) {
            this.pageNum = val;
            if(this.reportPermission){
                this.conditionQuery()
            }else{
                this.query()
            }
        },     
        eventFormatter: function (row, column, cellValue) {
            switch (row.event){
                case "A0001":
                    return "角色创建";
                case "A0002":
                    return "角色查询";
                case "A0003":
                    return "角色修改";
                case "A0004":
                    return "角色删除";
                case "A0005":
                    return "用户创建";
                case "A0006":
                    return "用户查询";
                case "A0007":
                    return "用户常规属性管理";
                case "A0008":
                    return "用户删除";
                case "A0009":
                    return "权限查询";
                case "A0010":
                    return "权限修改";
                case "A0011":
                    return "用户激活状态设置";
                case "A0012":
                    return "用户锁定状态管理";
                case "A0013":
                    return "用户绑定终端管理";
                case "A0014":
                    return "用户激活状态查询";

                case "B0001":
                    return "用户最大允许登录失败次数设定";
                case "B0002":
                    return "终端最多允许登录失败次数设定";
                case "B0003":
                    return "用户账号有效期设定";
                case "B0004":
                    return "用户密码有效期设定";
                case "B0005":
                    return "账户长期未使用期限设定";
                case "B0006":
                    return "用户允许登录时间段设定";
                case "B0007":
                    return "系统同时允许在线人数设定";
                case "B0008":
                    return "用户高频登录设定";
                case "B0009":
                    return "会话超时期限设定";
                case "B0010":
                    return "终端锁定状态设定";
                case "X0001":
                    return "用户高频访问事件";
                    // return;
                case "X0002":
                    return "会话超时事件";

                case "D0001":
                    return "用户登录日志查询";
                case "D0002":
                    return "用户安全日志查询";
                case "D0003":
                    return "用户操作日志查询";
                case "D0004":
                    return "安全日志报表分析查询";
                case "D0005":
                    return "操作日志报表分析查询";
                case "D0006":
                    return "登录日志报表分析查询";
                case "D0007":
                    return "登录日志存储期限管理";
                case "D0008":
                    return "操作日志存储期限管理";
                case "D0009":
                    return "安全日志存储期限管理";
                case "D0010":
                    return "会话报文日志记录期限";
            }
        },
        getSTime: function (val) {
            this.form.stime = val;
        },
        getETime: function (val) {
            this.form.etime = val;
        },
        identityFormatter: function (row, colum, cellValue) {
            return row.identity==1?'警员':'非警员'
        },
        timeFormatter: function (row, colum, cellValue) {
            return this.formatDateTime(row.time);
        },
        normalFormatter: function (row, column, cellValue) {
             return 1==row.normal? "常规业务": "非常规业务";
        },
        resultFormatter: function(row, column, cellValue){
            return 0 == row.result? "成功": "失败";
        },
        kernelFormatter: function (row, column, cellValue) {
            return 0 == row.kernel? "非核心": "核心";
        },
        moduleFormatter : function (row, column, cellValue) {
            if(row.module.indexOf("A")>-1){
                return "系统管理"
            }else if(row.module.indexOf("B")>-1){
                return "安全管理";
            }else if(row.module.indexOf("C")>-1){
                return "业务管理"
            }else if(row.module.indexOf("D")>-1){
                return "审计管理"
            }
        },
        typeFormatter: function(row, column, cellValue) {
           switch (row.type){
               case 0:
                   return "增加";
               case 1:
                   return "删除";
               case 2:
                   return "修改";
               case 3:
                   return "查询";
           }
        },
        tableRowClassName({row, rowIndex}) {
          if(this.reliable === false){
            return 'warning-row';
          }else{
              return 'success-row'
          }
        },
        conditionQuery: function () {
         
            let msg ={
                result: this.form.result,
                event: this.form.event,
                source: this.form.source,
                userId:this.form.userId,
                kernel: this.form.kernel,
                normal: this.form.normal,
                identity: this.form.identity,
                stime: this.timeStrToTimestamp(this.form.stime),
                etime: this.timeStrToTimestamp(this.form.etime)
            }
            // let url = "/security-logger/findreport.shtml?";
            let url = "/security-logger/findreport.shtml?pageSize="+this.pageSize+
                "&pageNum="+this.pageNum+"&entity="+encodeURI(JSON.stringify(msg));
            // url = url+"pageSize="+this.pageSize+"&";
            // url = url+"pageNum="+this.pageNum+"&";
            // url = (this.form.result == null || this.form.result == '') ? url: url+"result="+this.form.result+"&";
            // url = (this.form.event == null || this.form.event == '') ? url: url+"event="+this.form.event+"&";
            // url = (this.form.source == null || this.form.source == '') ? url: url+"source="+this.form.source+"&";
            // url = (this.form.userId == null || this.form.userId == '') ? url: url+"userId="+this.form.userId+"&";
            // url = (this.form.kernel == null || this.form.kernel == '') ? url: url+"kernel="+this.form.kernel+"&";
            // url = (this.form.normal == null || this.form.normal == '') ? url: url+"normal="+this.form.normal+"&";
            // url = (this.form.stime == null || this.form.stime == '') ? url: url+"stime="+this.timeStrToTimestamp(this.form.stime)+"&";
            // url = (this.form.etime == null || this.form.etime == '') ? url: url+"etime="+this.timeStrToTimestamp(this.form.etime)+"&";
            // url = this.form.result == null ? url: url+"result="+this.form.result+"&";
            this.HTTP.methods.apiGet(url).then(res =>
            {
                //console.log(res)
                this.searchFlag = false;
            this.loading = true;
            if(null != res && 200 == res.code){

                this.tableData.body = res.data.list
                 this.totalCount = res.data.total
                this.loading = false
                this.reportPermission = true

                 this.exportCondition.result=this.form.result
                this.exportCondition.userId=this.form.userId
                this.exportCondition.event=this.form.event
                this.exportCondition.kernel=this.form.kernel
                this.exportCondition.normal=this.form.normal
                this.exportCondition.source=this.form.source
                this.exportCondition.stime=this.form.stime
                this.exportCondition.etime=this.form.etime
                this.showReport()
                this.checkData()
            }else{
                this.tableData.body = []
                this.loading = false
                 this.totalCount =0 
                 this.reportPermission = false
            }
            }).catch(err => {
                    this.$message.error('网络超时')
                    this.loading = false
                     this.totalCount = 0
                      this.totalCount = []
                      this.reportPermission = false
                })
            },
         timeStrToTimestamp: function (str) {
           if(str){
                str = str.substring(0,19);
                str = str.replace(/-/g,'/');
                return new Date(str).getTime();
            }
            return null;
        },
        query(){

                this.HTTP.methods.apiGet("/security-logger/page.shtml?pageSize="+this.pageSize+"&pageNum="+this.pageNum
                    ).then(res =>
                {
                    if(null != res && 200 == res.code){

                        this.tableData.body = res.data.rows
                        this.totalCount = res.data.total
                        this.loading = false
                        this.showReport()
                        this.checkData()
                    }else{
                        this.tableData.body = null
                        this.totalCount = 0
                        this.loading = false
                    }
                }).catch(err => {
                        this.$message.error('网络超时')
                        this.loading = false
                        this.totalCount = 0
                    })
        },
        formatDateTime: function(inputTime){
            var date = new Date(inputTime);
            var y = date.getFullYear();
            var m = date.getMonth() + 1;
            m = m < 10 ? ('0' + m) : m;
            var d = date.getDate();
            d = d < 10 ? ('0' + d) : d;
            var h = date.getHours();
            h = h < 10 ? ('0' + h) : h;
            var minute = date.getMinutes();
            var second = date.getSeconds();
            minute = minute < 10 ? ('0' + minute) : minute;
            second = second < 10 ? ('0' + second) : second;
            return y + '-' + m + '-' + d+' '+h+':'+minute+':'+second;
        },
        getPermissionTypeName(perid) {
        let ret = ''
        switch (perid) {
            
            case 'A0011':
                ret = '用户激活状态设置'
                break
            case 'A0012':
                ret = '用户锁定状态设置'
                break
            case 'A0013':
                ret = '账号终端绑定'
                break
            case 'B0007':
                ret = '最大在线人数设置'
                break
            case 'B0010':
                ret = '终端锁定状态设置'
                break
            case "X0001":
                    return "用户高频访问";
            
        }
        return ret

    }
    },
    created() {
        this.query()
    }
}
</script>


